POV-Ray : Newsgroups : povray.binaries.images : The Struggle (aka Dandelion v1) : Version 2 Server Time
4 Nov 2024 17:57:02 EST (-0500)
  Version 2  
From: Chambers
Date: 22 Feb 2006 19:17:34
Message: <43fcff1e@news.povray.org>
OK, here's the next draft.  Some obvious, some not so obvious improvements.

I still need help on a few things:

- The texture for the dirt in the jar.  This is just bugging me.
- I'm thinking of replacing the dandelion with a rose; thoughts, anyone?

- The bricks (and mortar) show the correct bumpiness on the window-side; 
but the other sides are completely smooth.  Here's my code for creating 
a brick:

// Window Function
#local wc = (Window_Start + Window_End)/2; // Window Center
#local wcx = wc.x;	#local wcy = wc.y;	#local wcz = wc.z;
#local ws = (Window_End - Window_Start)/2; // Window Size
#local wsx = ws.x;	#local wsy = ws.y;	#local wsz = ws.z;
#local wf = function { max( abs(x-wcx)/wsx, abs(y-wcy)/wsy, 
abs(z-wcz)/wsz)-1 }

// Plane {x, 1}
#local p1 = function { x-1 }
// Plane {-x, -5}
#local p2 = function { 5-x }

#macro Brick(loc, siz)
// Brick Box Function
#local lx = loc.x;	#local ly = loc.y;	#local lz = loc.z;
#local sx = siz.x/2;	#local sy = siz.y/2;	#local sz = siz.z/2;
#local bf = function {max( abs(x-lx)/sx, abs(y-ly)/sy, abs(z-lz)/sz)-1}

// The difference between Brick Box, Window, p1 and p2
#local Brick_Func = function { max( bf(x,y,z), -wf(x,y,z), -p1(x,y,z), 
-p2(x,y,z)) }

isosurface {
	function {
		Brick_Func(x,y,z)
		- f_noise3d(x,y,z)/64
		- f_noise3d(x*8,y*8,z*8)/256
		- f_noise3d(x*32,y*32,z*32)/1024
	}
	contained_by {Brick_Box(loc, siz+1)}
	threshold 0
	texture { Brick_Tex }
}
#end

As I said, the bumpiness shows correctly where the window cuts out of 
the bricks, but the other sides are completely smooth.  This is 
frustrating me extremely.

I've got a bunch of other stuff I want to do with this image, but the 
rest can wait for now.

Thanks for looking,
...Chambers


Post a reply to this message


Attachments:
Download 'dandelion.png' (218 KB)

Preview of image 'dandelion.png'
dandelion.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.